<div class="modal-dialog modal-lg">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close guanbi" data-dismiss="modal" aria-hidden="true"></button>
            <h4 class="modal-title">新增扩展字段</h4>
        </div>
        <div class="modal-body ">
            <form class="modalForm form-horizontal" action="{:url('index/Arc/setArc')}" method="post">
                <input type="hidden" name="id" value="">
                <div class="portlet-body">
                    <div class="navbar navbar-default" role="navigation">
                        <div class="collapse navbar-collapse navbar-ex1-collapse">
                            <ul class="nav navbar-nav">
                              
                                <li class="active tags" data-id="1">
                                    <a href="#">
                                        扩展字段
                                    </a>
                                </li>
                               
                            </ul>
                        </div>
                    </div>
                    <script src="/static/assets/jwplayer/jwplayer.js"></script>
                    <script>jwplayer.key="bAoNHra71KE/mHvb0sirT4HeWLTAkpiYa1mVsA==";</script>
                    <script type="text/javascript" src="/static/assets/pdf/jquery.media.js"></script>
                    
                    <div class="tab-pane active" id="tab1" >
                        
                        <div class="form-group">
                            <label class="col-md-3 control-label">字段值</label>
                            <div class="col-md-9">
                                <input type="text" name="new1" value="" class="form-control" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">字段名cn</label>
                            <div class="col-md-9">
                                <input type="text" name="new2" value="" class="form-control" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">cat_id</label>
                            <div class="col-md-9">
                                <input type="text" name="new3" value="" class="form-control" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">类型</label>
                            <div class="col-md-9">
                                <input type="text" name="new4" value="" class="form-control" >
                            </div>
                        </div>
                        <hr>
                       
                        <!--<div class="form-group">
                            <label class="col-md-3 control-label">鉴定时间</label>
                            <div class="col-md-9">
                                <input type="date" value="99" name="otags" class="form-control" placeholder="请输入鉴定时间">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">鉴定人</label>
                            <div class="col-md-9">
                                <input type="date" value="99" name="otags" class="form-control" placeholder="请输入鉴定人">
                            </div>
                        </div>-->
                    </div>
                     


                </div>
            </form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn default model1close" data-dismiss="modal">关闭</button>
            <!-- <button type="button" class="btn blue save">保存</button> -->
        </div>
    </div>
</div>



<div class="modal fade " id="model2" tabindex="-1" role="model2" aria-hidden="true" style="display: none;">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close closeBtn" data-dismiss="model2" aria-hidden="true"></button>
                <h4 class="modal-title">选择档案盒</h4>
            </div>
            <div class="modal-body">

                <div class="selectShow" style="display: none"></div>
                <form class="modal2Form form-horizontal" action="{:url('index/Arc/updateTags')}" method="post">
                    <div class="portlet green box">
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="fa fa-cogs"></i>档案盒树型菜单
                            </div>
                        </div>
                        <div class="portlet-body">
                            <div id="tree_1" class="tree-demo" >
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn default closeBtn" data-dismiss="modal2">关闭</button>
                <button type="button" class="btn blue saveBtn2">保存</button>
            </div>
        </div>
    </div>
</div>


<script src="/static/assets/scripts/core/jquery.media.js" type="text/javascript"></script>
                        
<script>
    $(function() {
        var did='',dname='';
        App.init();
        UITree.init();
        $('#tab1').show();
      
            $('.tags').removeClass('active');
            $(this).addClass('active');
            $('.tag_val').val(id);
            return false;
        });
        $('.seBtn').click(function () {
            $('#model2').modal('show');
            $("#tree_1").on('changed.jstree', function (e, data) {
                var id = data.node.data.id;

                $('.selectShow').hide(100);
                $.ajax({
                    url:'{:url("index/Storage/getStorage3")}',
                    data:{id:id},
                    type:'post',
                    dataType:'json',
                    success:function (e) {
                        if(e.code == 1){
                            var html =  '<div class="alert alert-success alert-dismissable">' +
                                '<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>' +
                                '<strong>档案盒名称：'+e.data.sto_name+'，厚度：'+e.data.sto_thickness+'，总页数：'+e.data.sto_available_pages+'，已存放页数：'+e.data.to_available_pages+'，可存放页数'+e.data.sy_available_pages+'</strong> '+
                                '</div>';
                            did = id;
                            dname = e.data.sto_name;
                        }else{
                            var html =  '<div class="alert alert-danger alert-dismissable">' +
                                '<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>' +
                                '<strong>'+e.msg+'</strong> '+
                                '</div>';
                            did = '';
                            dname = '';
                        }
                        $('.selectShow').html(html);
                        $('.selectShow').show(100);
                    }
                });

                return false;
            });
            return false;
        });
        $('.saveBtn2').click(function () {
            if(did == ''){
                var html =  '<div class="alert alert-danger alert-dismissable">' +
                    '<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>' +
                    '<strong>请选择档案盒</strong> '+
                    '</div>';
                $('.selectShow').html(html);
                $('.selectShow').show(100);
            }else{
                $('.box_id').val(did);
                $('.box_name').val(dname);
                $('#model2').modal('hide');
            }
        });
        $('.closeBtn').click(function () {
            $('#model2').modal('hide');
             thePlayer.stop();
        });
        dt().modalSave();
    });
</script>
<script>
    $('.guanbi').click(function(){
            playerInstance.stop(); 
    });
    $('.model1close').click(function(){
            playerInstance.stop(); 
    });
</script>

